package com.xzx.annotation.bean;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @author xinzhixuan
 * @version V1.0
 * @date 2018/7/14 22:30
 */
@Component
public class Dog {
    public Dog() {
        System.out.println("Dog  constroctor................");
    }

    // 构造器之后
    @PostConstruct
    public void init() {
        System.out.println("Dog init............................");
    }

    // 销毁之前
    @PreDestroy
    public void destory() {
        System.out.println("Dog destory.......................");
    }
}
